//
//  MediaBookXMLParser.h
//  Dolphin
//
//  Created by Handymood on 11-5-25.
//  Copyright 2011 __Hanydmood__. All rights reserved.
//

#import <Foundation/Foundation.h>
#include <libxml/xmlreader.h>

#import "SinglePageInfo.h"
#import  "LayerInfo.h"
#import  "GlobalSet.h"
#import  "IndexPageInfo.h"
#import "UpToolBarInfo.h"

@class SinglePageInfo;
@class LayerInfo;
@class GlobalSet;
@class IndexPageInfo;
@class UpToolBarInfo;

@interface MediaBookXMLParser : NSObject 
{
    NSMutableArray *pagesArr;
    NSMutableArray *pagePropArr;
    GlobalSet *gDataSet;
    UpToolBarInfo *upToolBarInfo;
    IndexPageInfo *bottomIndexPage;
    BOOL isIPad;
    
    NSMutableData *xmlDataBuffer;
    NSURLConnection *xmlLoadConnect;
    
    NSString *loadOverMSG;
    
    BOOL dataReceiveErr;
}

@property(nonatomic,copy) NSMutableArray *pagesArr;
@property(nonatomic,copy) NSMutableArray *pagePropArr;
@property(nonatomic,copy) GlobalSet *gDataSet;
@property(nonatomic,copy) UpToolBarInfo *upToolBarInfo;
@property(nonatomic,copy) IndexPageInfo *bottomIndexPage;
@property BOOL isIPad;

-(void) preDefaultGlobalDataToSinglePage:(SinglePageInfo *) tempPageInfo;
-(void) makeDataCompatibleWithIPhone;
-(void) startParsing:(NSString *) inXMLAddress 
                finishMsg:(NSString *) inLoadOverMsg;

-(void) xmlParseProc:(xmlTextReaderPtr) xmlreader;
-(void) reset;

@end
